<!DOCTYPE html>
<html>

	<head>
		<meta charset="utf-8">
		<meta name="viewport" content="width=device-width,initial-scale=1,minimum-scale=1,maximum-scale=1,user-scalable=no" />
		<title></title>
		<script src="js/jquery-2.1.0.js" type="text/javascript" charset="utf-8"></script>
		<script src="js/mui.min.js"></script>
		<link href="css/mui.min.css" rel="stylesheet" />
		<script type="text/javascript" charset="utf-8">
			(function browserRedirect() {
				var sUserAgent = navigator.userAgent.toLowerCase();
				var bIsIpad = sUserAgent.match(/ipad/i) == 'ipad';
				var bIsIphone = sUserAgent.match(/iphone os/i) == 'iphone os';
				var bIsMidp = sUserAgent.match(/midp/i) == 'midp';
				var bIsUc7 = sUserAgent.match(/rv:1.2.3.4/i) == 'rv:1.2.3.4';
				var bIsUc = sUserAgent.match(/ucweb/i) == 'web';
				var bIsCE = sUserAgent.match(/windows ce/i) == 'windows ce';
				var bIsWM = sUserAgent.match(/windows mobile/i) == 'windows mobile';
				var bIsAndroid = sUserAgent.match(/android/i) == 'android';
				/*if(!bIsAndroid) {
					setInterval(function() {
						alert("必须使用手机浏览器");
					}, 5000);
				}*/
			})();
			mui.init({
				subpages: [{
					url: url, //子页面HTML地址，支持本地地址和网络地址
					id: "iframe",
					styles: {
						top: "135px", //子页面顶部位置
						bottom: "0", //子页面底部位置
						width: "100%", //子页面宽度，默认为100%
						height: "100%", //子页面高度，默认为100%
					},
					extras: {} //额外扩展参数
				}]
			});
			var time = null;
			$(function(){
				chonglian();
			});
			function chonglian() {
				var key = "";
				$.ajax({
					type: "get",
					url: "json/key.json",
					async: false,
					dataType: "json",
					success: function(re) {
						key = re.key;
					}
				});
				if(key != "" || key != null) {
					//alert(key);
					var Url2 = key;
					var oInput = document.createElement('input');
					oInput.value = Url2;
					document.body.appendChild(oInput);
					oInput.select();
					document.execCommand("Copy");
					oInput.className = 'oInput';
					oInput.style.display = 'none';
				}
				var value = $("#zdclsz").val();
				clearInterval(time);
				switch(value) {
					case "1":
						time = setInterval(function() {
							$("#iframe").attr("src", url);
						}, 1000 * 5);
						mui.toast("已设置为5s")
						break;
					case "2":
						time = setInterval(function() {
							$("#iframe").attr("src", url);
						}, 1000 * 10);
						mui.toast("已设置为10s")
						break;
					case "3":
						time = setInterval(function() {
							$("#iframe").attr("src", url);
						}, 1000 * 15);
						mui.toast("已设置为15s")
						break;
					case "4":
						time = setInterval(function() {
							$("#iframe").attr("src", url);
						}, 1000 * 30);
						mui.toast("已设置为30s")
						break;
					case "5":
						mui.toast("已暂停")
						break;
				}
			}
		</script>
		<style type="text/css">
			.mui-bar {
				background: linear-gradient(to right, #4F8DFE, #4537F5);
			}
			
			.mui-bar .mui-title {
				color: #FFFFFF
			}
			
			.mui-input-row label {
				width: 50%!important;
			}
			
			.mui-input-row label~input,
			.mui-input-row label~select,
			.mui-input-row label~textarea {
				width: 50%!important;
			}
		</style>
	</head>

	<body>
		<header class="mui-bar mui-bar-nav">
			<a class="mui-icon mui-pull-right" target="_blank" href="//shang.qq.com/wpa/qunwpa?idkey=1bd1004442a7467cf0df7b7ed3a99a77904fe65b767dd9bb709ab07772884b8d"><img border="0" src="//pub.idqqimg.com/wpa/images/group.png" alt="华夏万家讨论群" title="华夏万家讨论群"></a>
			<h1 class="mui-title">华夏万家排队神器</h1>
		</header>
		<div class="mui-content">
			<form class="mui-input-group">
				<div class="mui-input-row">
					<label>自动重连设置(必填)</label>
					<select onchange="chonglian()" id="zdclsz">
						<option value="1">5s</option>
						<option value="2">10s</option>
						<option value="3">15s</option>
						<option value="4">30s</option>
						<option value="5">暂停</option>
					</select>
				</div>
			</form><form class="mui-input-group">
			    <div class="mui-input-row">
			        <label>群号码</label>
			        <input disabled="" value="616564176" type="text" class="mui-input-clear" placeholder="input">
			    </div>
			</form>

		</div>
		<!--<nav class="mui-bar mui-bar-tab" style="background: #fff;">
			<span>群号码:</span> <input value="616564176" type="text" placeholder="普通输入框">
		</nav>-->
	</body>

</html>